package com.crm.common.model.Enum;

/**
 * 修改名称
 */
public enum ModificationEnum {

    CONTACTNAME(1,"联系人姓名"),

    CONTACTPOSITION(2,"职务"),

    ONTHEJOBSITUATION(3,"在职情况"),

    CONTACTINFORMATION(4,"联系方式"),

    MAILBOX(5,"邮箱"),

    WX(6,"微信"),

    CONTACTSTATE(7,"联系人类型"),

    HOMEADDRESS(8,"家庭住址"),

    COMPANYADDRESS(9,"公司住址"),

    UPLOADID(10,"图片上传id"),

    TAG(11,"标签"),

    CUSTOMERNAME(12,"客户名称"),

    UNIFIEDSOCIALCREDITCODE(13,"统一社会信用代码"),

    SYSTEMTAG(14,"系统标签");

    private int ModificationCode;
    private String ModificationName;

    ModificationEnum(int ModificationCode, String ModificationName){
        this.ModificationCode = ModificationCode;
        this.ModificationName = ModificationName;
    }

    public int getModificationCode(){
        return ModificationCode;
    }

    public String getModificationName(){
        return ModificationName;
    }

    /**
     * 获取修改名称
     * @param modificationCode
     * @return
     */
    public static String getNameByCode(int modificationCode){
        for (ModificationEnum value : ModificationEnum.values()) {
            if(value.getModificationCode() == modificationCode){
                return value.getModificationName();
            }
        }
        return null;
    }

}
